<?php
$openid = $_REQUEST["openid"];
$score = $_REQUEST["score"];
echo updateScore($openid,$score);
// 更新分数
function  updateScore($openid,$score){
  // 链接数据库
  $mysql = new mysqli(SAE_MYSQL_HOST_M.":".SAE_MYSQL_PORT,SAE_MYSQL_USER,SAE_MYSQL_PASS,SAE_MYSQL_DB);
//清除乱码
  $mysql->query("set names utf8");
// sql语句
$sql = "UPDATE shuqiansql SET score = '$score' WHERE openid = '$openid'";
$result = $mysql->query($sql);
  $mysql->close();
}








 ?>
